package com.claude.util;

/**
 * Created by Claude on 2014/12/24.
 */
public class Configure {

    private static Configure instance = null;

    public static Configure getInstance(){
        if(instance == null){
            synchronized (Configure.class){
                if(instance == null){
                    return new Configure();
                }
            }
        }
        return instance;
    }

    private Configure(){
    }

    private final String currentVersion = "2.5";
    private final String host = "";
    private final String loginUrl = "validateClient";
    private final String subjectUrl = "querySessionJSON";
    private final String sessionUrl = "queryCronJSON";
    private final String postUrl = "receiveDataJSON";
    private final String updateUrl = "checkVersionJSON";
    private final String savedPath = android.os.Environment
            .getExternalStorageDirectory().getAbsolutePath() + "/Nightmare";

    public String getUpdateUrl(){
        return this.host + this.updateUrl;
    }

    public String getPostUrl(){
        return this.host + this.postUrl;
    }

    public String getVersion(){
        return this.currentVersion;
    }

    public String getLoginUrl() {
        return this.host + this.loginUrl;
    }

    public String getSubjectUrl() {
        return this.host + this.subjectUrl;
    }

    public String getSessionUrl() {
        return this.host + this.sessionUrl;
    }

    public String getPath() {
        return this.savedPath;
    }
}